CC = gcc
CFLAGS = -g -Wall
TARGETS = smoker supplier

all: $(TARGETS)

smoker: smoker.o ipc.o
	$(CC) $(CFLAGS) -o smoker smoker.o ipc.o

supplier: supplier.o ipc.o
	$(CC) $(CFLAGS) -o supplier supplier.o ipc.o

smoker.o: smoker.c ipc.h
	$(CC) $(CFLAGS) -c smoker.c

supplier.o: supplier.c ipc.h
	$(CC) $(CFLAGS) -c supplier.c

ipc.o: ipc.c ipc.h
	$(CC) $(CFLAGS) -c ipc.c

clean:
	rm -f $(TARGETS) *.o
